package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * DvDevolucRta generated by hbm2java
 */
@Entity
@Table(name = "DV_DEVOLUC_RTA", schema = "DEVOLUCIONES")
public class DvDevolucRta implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 997896807515263740L;
	private Long iindice;
	private EdDeclaraciones edDeclaraciones;
	private String nfolio;
	private RcRuc rcRuc;
	private String ntelefono;
	private String nfax;
	private String semail;
	private String nitrepresentante;
	private Date fpresentacion;
	private Double vtotalDevolucion;
	private Double vtotalSolicitado;
	private Set<DvDevolucRtaDet> dvDevolucRtaDets = new HashSet<DvDevolucRtaDet>(
			0);

	public DvDevolucRta() {
	}

	public DvDevolucRta(Long iindice) {
		this.iindice = iindice;
	}

	public DvDevolucRta(Long iindice, String nfolio, RcRuc rcRuc,
			Date fpresentacion) {
		this.iindice = iindice;
		this.nfolio = nfolio;
		this.rcRuc = rcRuc;
		this.fpresentacion = fpresentacion;
	}

	/**
	 * @return the iindice
	 */
	@Id
	@Column(name = "I_INDICE", nullable = false, precision = 18, scale = 0)
	public Long getIindice() {
		return iindice;
	}

	/**
	 * @param iindice
	 *            the iindice to set
	 */
	public void setIindice(Long iindice) {
		this.iindice = iindice;
	}

	/**
	 * @return the edDeclaraciones
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "I_INDICE", unique = true, nullable = false, insertable = false, updatable = false)
	public EdDeclaraciones getEdDeclaraciones() {
		return edDeclaraciones;
	}

	/**
	 * @param edDeclaraciones
	 *            the edDeclaraciones to set
	 */
	public void setEdDeclaraciones(EdDeclaraciones edDeclaraciones) {
		this.edDeclaraciones = edDeclaraciones;
	}

	/**
	 * @return the nfolio
	 */
	@Column(name = "N_FOLIO", nullable = false, length = 12)
	public String getNfolio() {
		return nfolio;
	}

	/**
	 * @param nfolio
	 *            the nfolio to set
	 */
	public void setNfolio(String nfolio) {
		this.nfolio = nfolio;
	}

	/**
	 * @return the rcRuc
	 */
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "NIT")
	public RcRuc getRcRuc() {
		return rcRuc;
	}

	/**
	 * @param rcRuc
	 *            the rcRuc to set
	 */
	public void setRcRuc(RcRuc rcRuc) {
		this.rcRuc = rcRuc;
	}

	/**
	 * @return the ntelefono
	 */
	@Column(name = "N_TELEFONO", nullable = true, length = 8)
	public String getNtelefono() {
		return ntelefono;
	}

	/**
	 * @param ntelefono
	 *            the ntelefono to set
	 */
	public void setNtelefono(String ntelefono) {
		this.ntelefono = ntelefono;
	}

	/**
	 * @return the nfax
	 */
	@Column(name = "N_FAX", nullable = true, length = 8)
	public String getNfax() {
		return nfax;
	}

	/**
	 * @param nfax
	 *            the nfax to set
	 */
	public void setNfax(String nfax) {
		this.nfax = nfax;
	}

	/**
	 * @return the semail
	 */
	@Column(name = "S_EMAIL", nullable = true, length = 60)
	public String getSemail() {
		return semail;
	}

	/**
	 * @param semail
	 *            the semail to set
	 */
	public void setSemail(String semail) {
		this.semail = semail;
	}

	/**
	 * @return the nitrepresentante
	 */
	@Column(name = "NIT_REPRESENTANTE", nullable = false, length = 14)
	public String getNitrepresentante() {
		return nitrepresentante;
	}

	/**
	 * @param nitrepresentante
	 *            the nitrepresentante to set
	 */
	public void setNitrepresentante(String nitrepresentante) {
		this.nitrepresentante = nitrepresentante;
	}

	/**
	 * @return the fpresentacion
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(insertable = true, name = "F_PRESENTACION", length = 7, nullable = false, updatable = true)
	public Date getFpresentacion() {
		return fpresentacion;
	}

	/**
	 * @param fpresentacion
	 *            the fpresentacion to set
	 */
	public void setFpresentacion(Date fpresentacion) {
		this.fpresentacion = fpresentacion;
	}

	/**
	 * @return the vtotalDevolucion
	 */
	@Column(name = "V_TOTAL_DEVOLUCION", nullable = true, precision = 11, scale = 2)
	public Double getVtotalDevolucion() {
		return vtotalDevolucion;
	}

	/**
	 * @param vtotalDevolucion
	 *            the vtotalDevolucion to set
	 */
	public void setVtotalDevolucion(Double vtotalDevolucion) {
		this.vtotalDevolucion = vtotalDevolucion;
	}

	/**
	 * @return the vtotalSolicitado
	 */
	@Column(name = "V_TOTAL_SOLICITADO", nullable = true, precision = 12, scale = 2)
	public Double getVtotalSolicitado() {
		return vtotalSolicitado;
	}

	/**
	 * @param vtotalSolicitado
	 *            the vtotalSolicitado to set
	 */
	public void setVtotalSolicitado(Double vtotalSolicitado) {
		this.vtotalSolicitado = vtotalSolicitado;
	}

	/**
	 * @return the dvDevolucRtaDets
	 */
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "dvDevolucRta")
	public Set<DvDevolucRtaDet> getDvDevolucRtaDets() {
		return dvDevolucRtaDets;
	}

	/**
	 * @param dvDevolucRtaDets
	 *            the dvDevolucRtaDets to set
	 */
	public void setDvDevolucRtaDets(Set<DvDevolucRtaDet> dvDevolucRtaDets) {
		this.dvDevolucRtaDets = dvDevolucRtaDets;
	}

}
